package com.bdth.model;

import java.util.Date;

public class TerminalCommand extends BaseModel {
	private Integer terminalCommandID;

	private String cmdSource;

	private String cmdType;

	private String simNo;

	private String state;

	private Date updateDate;

	private Date createDate;

	private Integer userID;

	private String cmdContent;

	private String remark;

	public static String FromTerminal = "terminal";//来自北斗应用设备
	public static String FromPlatform = "platform";//来自北斗分理服务平台
	public static String FromApplication = "application";//来自北斗应用平台
	public static String FromThirdParty = "thirdparty";//来自三方数据中心

	public static String STATUS_NEW = "New";
	public static String STATUS_PROCESSING = "Processing";
	public static String STATUS_INVALID = "Invalid";
	public static String STATUS_SUCCESS = "Success";

	//指令类型集
	public static String TYPE_DMDW = "dmdv";//点名定位
	public static String TYPE_PTBW = "ptbw";//普通报文


	public enum TCommandStatus {
		Processing("Processing", "发送成功,等待应答"), Offline("Offline", "发送失败"), Invalid("Invalid", "命令格式错误"), Success("Success", "命令执行成功"),
		Failed("Failed", "发送失败"), New("New", "等待发送"), Received("Received", "接收成功"), Uploaded("Uploaded", "上传成功"), NotSupport("NotSupport", "终端不支持");

		public String key;

		public String value;

		private TCommandStatus(String key, String value) {
			this.key = key;
			this.value = value;
		}

		public static String get(String key) {
			TCommandStatus[] values = TCommandStatus.values();
			for (TCommandStatus object : values) {
				if (object.key.equals(key)) {
					return object.value;
				}
			}
			return null;
		}
	}

	public Integer getTerminalCommandID() {
		return terminalCommandID;
	}

	public void setTerminalCommandID(Integer terminalCommandID) {
		this.terminalCommandID = terminalCommandID;
	}

	public String getCmdSource() {
		return cmdSource;
	}

	public void setCmdSource(String cmdSource) {
		this.cmdSource = cmdSource == null ? null : cmdSource.trim();
	}

	public String getCmdType() {
		return cmdType;
	}

	public void setCmdType(String cmdType) {
		this.cmdType = cmdType == null ? null : cmdType.trim();
	}

	public String getSimNo() {
		return simNo;
	}

	public void setSimNo(String simNo) {
		this.simNo = simNo == null ? null : simNo.trim();
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state == null ? null : state.trim();
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Integer getUserID() {
		return userID;
	}

	public void setUserID(Integer userID) {
		this.userID = userID;
	}

	public String getCmdContent() {
		return cmdContent;
	}

	public void setCmdContent(String cmdContent) {
		this.cmdContent = cmdContent == null ? null : cmdContent.trim();
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark == null ? null : remark.trim();
	}

}